package com.lmmob.autotest.uitest.util;

import java.util.Random;

public class StringData {
	
	public static String newEmail()
	{
		StringBuffer buffer=new StringBuffer("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
		StringBuffer sb=new StringBuffer();
		Random r=new Random();
		int range=buffer.length();
		for(int i=0;i<15;i++)
		{
			sb.append(buffer.charAt(r.nextInt(range)));
		}
		sb.append("@frontendtest.com");
		return sb.toString();
	}
	
	public static String newString(int length)
	{
		StringBuffer buffer=new StringBuffer("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
		StringBuffer sb=new StringBuffer();
		Random r=new Random();
		int range=buffer.length();
		for(int i=0;i<length;i++)
		{
			sb.append(buffer.charAt(r.nextInt(range)));
		}
		return sb.toString();
	}
	
	public static String newIntString(int length)
	{
		StringBuffer buffer=new StringBuffer("123456789");
		StringBuffer sb=new StringBuffer();
		Random r=new Random();
		int range=buffer.length();
		for(int i=0;i<length;i++)
		{
			sb.append(buffer.charAt(r.nextInt(range)));
		}
		return sb.toString();
	}
	
	public static void main(String args[])
	{
		for(int i=0;i<100;i++)
		{
			System.out.println(StringData.newEmail());
		}
	}

}
